﻿using GameFramework.command;
using GameFramework.skill;
using UnityEngine;

namespace Game.modules.player.input
{
    public class ReleaseSkillCommand:ICommand
    {
        //释放的技能id
        private int skillId;
        //释放技能的对象
        private GameObject releaseObj;
        public bool canExcute()
        {
            return true;
        }

        public void excute()
        {
            if (releaseObj == null)
            {
                return;
            }

            SkillManager skillManager = releaseObj.GetComponent<SkillManager>();
            skillManager.releaseSkill(skillId);
        }
    }
}